import org.ini4j.Ini;
import javax.swing.*;

/**
 * Representation of the Cell Area, inherited from Area Class
 * @author Luc Peres
 * @version 2.0
 */
public class Cell extends Area{
	
	/**
	 * Cell constructor
	 */
	public Cell(){
		super();
		this.initialize();
	}
	
	/**
	 * Initialization of each member got from the Param Class
	 */
	public void initialize() {
		Ini params = Param.getParam().getParams();
		this.GSH = Double.parseDouble(params.get("Cell/initialization", "GSH"));
		this.GSSG = Double.parseDouble(params.get("Cell/initialization", "GSSG"));
		this.Gor = Double.parseDouble(params.get("Cell/initialization", "Gor"));
		this.ArcB = Double.parseDouble(params.get("Cell/initialization", "ArcB"));
		this.ArcAP = Double.parseDouble(params.get("Cell/initialization", "ArcA-P"));
		this.Cbl = Double.parseDouble(params.get("Cell/initialization", "Cbl"));
		this.gshA = Double.parseDouble(params.get("Cell/initialization", "gshA"));
		this.gshB = Double.parseDouble(params.get("Cell/initialization", "gshB"));
		this.put = Double.parseDouble(params.get("Cell/initialization", "put"));
		this.fimB = Double.parseDouble(params.get("Cell/initialization", "fimB"));
		this.FimB = Double.parseDouble(params.get("Cell/initialization", "FimB"));
		this.fimS = Double.parseDouble(params.get("Cell/initialization", "fimS"));
	}
	
	/**
	 * Prints every member of the Periplasm
	 * @param textArea: Window's textArea
	 */
	public void print(JTextArea textArea) {
		textArea.setText(textArea.getText() + "\nArea: Cell");
		super.print(textArea, "Cell");
	}
}
